﻿using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Quic;

namespace ModalValidation;

public class Employee
{
    public int Id { get; set; }
    [Required]
    public string Name { get; set; }
    [Required]
    public string Position { get; set; }
    [Required]
    [Range(50000,200000)]
    [Employee_EnsureSalary]
    public double Salary { get; set; }

    public Employee(int id,string name,string position,double salary)
    {
        Id = id;
        Name = name;
        Position = position;
        Salary = salary;
    }
    
    
}